<template>
	<view class="mian">
		<rich-text :nodes="content"></rich-text>
	</view>
</template>

<script>
	import {
		getAgreement
	} from "@/api/api.js"
	export default {
		data() {
			return {
				content:''
			}
		},
		onLoad(options) {
			if (options.title) {
				uni.setNavigationBarTitle({
					title: options.title
				});
			}
			if(options.type){
				this.getAgreement(options.type)
			}
		},
		methods: {
			getAgreement(type){
				getAgreement({
					type:type,
					useType:1
				}).then(res=>{
					this.content = res.data.content
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.mian {
		margin: 24rpx;
	}
</style>